#pragma once


#include <iostream>
#include <cstring>
#include <fcntl.h>

void SetNonBlock(int fd)
{
    int fl = fcntl(fd, F_GETFD);
    if(fl == -1)
    {
        std::cout << errno << ": " << strerror(errno) << std::endl;
    }

    int ret = fcntl(fd, F_SETFL, fl | O_NONBLOCK);
}
